<template>
  <el-button :type="type" :size="size" @click="handleClick">{{ label }}</el-button>
</template>

<script setup>
import { defineProps, defineEmits } from 'vue';

// 定义 props
const props = defineProps({
  type: {
    type: String,
    default: 'default'
  },
  size: {
    type: String,
    default: 'medium'
  },
  label: {
    type: String,
    required: true
  }
});

// 定义 emits
const emit = defineEmits(['click']);

// 定义方法
const handleClick = () => {
  emit('click');
};
</script>
